package facebook;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Wael Mallek
 */
import java.awt.event.ActionListener;

import javax.swing.*;


public class FacebookTestClient_11 extends JFrame {

 JButton login;
 JButton getPermissionsForApp;
 JButton retrieveUser;
 JButton getAccessToken;
 JButton exit;

    private final JScrollPane jScrollPane1;
    private final JLabel jLabel1;
    public final JTextArea tokenn;
    private final JButton connect;

 public FacebookTestClient_11() {

  getPermissionsForApp = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tokenn = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        connect = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        getPermissionsForApp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/fb-logo.png"))); // NOI18N
        getPermissionsForApp.setText("Login");

        tokenn.setColumns(20);
        tokenn.setRows(5);
        jScrollPane1.setViewportView(tokenn);

        jLabel1.setForeground(new java.awt.Color(0, 51, 255));
        jLabel1.setText("Coppier le Token généré ici : ");

        connect.setText("Connect");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(129, 129, 129)
                .addComponent(getPermissionsForApp, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
                .addGap(173, 173, 173))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(295, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(connect)
                .addContainerGap(361, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(getPermissionsForApp)
                .addGap(68, 68, 68)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(connect)
                .addContainerGap(17, Short.MAX_VALUE))
        );

  setDefaultCloseOperation(HIDE_ON_CLOSE);
  setSize(100, 125);
  setLocationRelativeTo(null);
  setVisible(true);
  pack();

 }

 public void setLoginListener(ActionListener l) {
  login.addActionListener(l);
 }

 public void setgetPermissionsForAppListener(ActionListener l) {
  getPermissionsForApp.addActionListener(l);
 }
 public void setConnectListener(ActionListener l) {
     connect.addActionListener(l);
   }


 public String getTocken()
 {

     String s = tokenn.getText();
     return s;
 }



}
